<?php

/*
 * 简单发送邮件
 * recipient	收件人，多个收件人可以是个数组或,或空格分隔的字符串
 * subject	主题
 * message	邮件内容
 */
if ( ! function_exists('send_email'))
{
	function send_email($recipient, $subject, $message)
	{
		$ci = & get_instance();
		$ci->config->load('email', TRUE);
		$config = $ci->config->item('email');
		
		$ci->load->library('email');
		$ci->email->initialize($config);
		$ci->email->from($config['smtp_email'], $config['your_name']);
		$ci->email->to($recipient);
		$ci->email->subject($subject);
		$ci->email->message($message);
		return $ci->email->send();
	}
}